<?php
/**
 * SEO 产品分类列表, 隐藏内容
 *
 * @author Zeon <scplay@gmail.com>
 * @date 2018/8/28
 * @copyright PanxSoft Inc.
 *
 * @var \Illuminate\Pagination\LengthAwarePaginator $product_categories
 * @var \App\Http\Models\Admin\ProductCategory $product_category
 * @var \App\Http\Models\Admin\ProductCategory $sub_category
 */
?>

<div class="seo-hidden product-category-nav">
    @if(isset($product_categories))
        {{-- 主类 --}}
        <ul class="product-category-list">
            @foreach($product_categories as $product_category)
                <li class="product-item">
                    {{-- 主类信息 --}}
                    <span class="product-category-name">{{ $product_category->name }}</span>
                    <span class="product-category-description">{{ $product_category->description }}</span>
                    <img src="{{ $product_category->thumb }}" alt="" class="product-category-thumb">

                    {{-- 子类 --}}
                    <ul class="sub-category">
                        @foreach($product_category->subCategories as $sub_category)
                        <li class="sub-category-item">
                            {{-- 子类信息，有 url  --}}
                            <a href="{{ $sub_category->link }}" class="product-category-link">
                                <span class="product-category-name">{{ $sub_category->name }}</span>
                                <span class="product-category-description">{{ $sub_category->description }}</span>
                                <img src="{{ $sub_category->thumb }}" alt="" class="product-category-thumb">
                            </a>
                        </li>
                        @endforeach
                    </ul>

                </li>
            @endforeach
        </ul>
    @endif
</div>